Dynomotion

Group: DynoMotion Message: 2298 From: frank_19_88 Date: 11/18/2011
Subject: Re: soft limit switch
Hi Tom,

At the moment i can home the Maho machine for this i used HomeEncoderMach3.C so X, Y and Z can be homed by pressing 'Ref all home'.

I want to create soft limits, in this forum i read it is not possible to use mach3 soft limits. But i could not found an solution at this form. (Only read it is possible to create an .c file with your help)

Can you help me creating an .c file for the following subjects:
- Soft limit (Like X can move from the home position to -10.000 till +300.000)
- Mach3 movement shoot be disabled when the machine isn't homed or when the soft limits are not active.

If you have an sample I can modify it and try it out tomorrow.

Thank you,

Frank


--- In DynoMotion@yahoogroups.com, "frank_19_88" <frank_19_88@...> wrote:
>
> Hey Tom,
>
> Proud to present you the following video of my maho 300C
> http://youtu.be/BGoXeestgy4
>
> Frank,
>
Group: DynoMotion Message: 2315 From: Tom Kerekes Date: 11/18/2011
Subject: Re: soft limit switch
Hi Frank,
 
I think it will take a while to think through and develop that.  Also we will need to research if/how it is possible to tell Mach3 not to allow any motion.
 
But here might be a partial solution:
 
On initial RESET when the position is unknown we will enable the axes but not allow any motion at all (any attempt at motion will disable the axis which will require another RESET).  Configuring the Axis as "Disallow drive into limit" with both limits triggered will do this. 
 
Then the the Operator will need to REF ALL HOME which will disable Limits, Home, Zero, Enable Soft Limits.
 
Let's use a UserData Variable 99 as the Limit "Mode"
 
Mode=0 Disallow any motion
Mode=1 Allow any motion
Mode=2 Watch Soft Limits
 
Basically add a forever loop at the end of your Init.c program to include the code to create Virtual limit switch bits (bits 48-63 are virtual).  Then configure the axis to watch those bits and select "Disallow drive into limit".  You have the choice to watch Position or Dest.  If you have encoders probably Position is best.  
 
So in summary what you need to do is:
 
#1 Configure axis to watch Limits bits 48 and 49 as "Disallow drive into limit"
 
#2 Merge this code into your Init.c Program
 
 
 
#3 Change your Home user program to set the mode to 1 at the beginning of the Home and mode to 2 at the end
 
#define #define LMODEV 99
persist.UserData[LMODEV]=1;
.
.
.
persist.UserData[LMODEV]=2;
 
 
Please give it a try and see if it works.
 
Regards
TK

 
Group: DynoMotion Message: 2415 From: frank_19_88 Date: 11/25/2011
Subject: Re: soft limit switch
Hey tom,

Thank you very match,

The code did work directly, of cause I did change it a little for the machine and copied it for the y and z ass.


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Frank,
>  
> I think it will take a while to think through and develop that.  Also we will need to research if/how it is possible to tell Mach3 not to allow any motion.
>  
> But here might be a partial solution:
>  
> On initial RESET when the position is unknown we will enable the axes but not allow any motion at all (any attempt at motion will disable the axis which will require another RESET).  Configuring the Axis as "Disallow drive into limit" with both limits triggered will do this. 
>  
> Then the the Operator will need to REF ALL HOME which will disable Limits, Home, Zero, Enable Soft Limits.
>  
> Let's use a UserData Variable 99 as the Limit "Mode"
>  
> Mode=0 Disallow any motion
> Mode=1 Allow any motion
> Mode=2 Watch Soft Limits
>  
> Basically add a forever loop at the end of your Init.c program to include the code to create Virtual limit switch bits (bits 48-63 are virtual).  Then configure the axis to watch those bits and select "Disallow drive into limit".  You have the choice to watch Position or Dest.  If you have encoders probably Position is best.  
>  
> So in summary what you need to do is:
>  
> #1 Configure axis to watch Limits bits 48 and 49 as "Disallow drive into limit"
>  
> #2 Merge this code into your Init.c Program
>  
> http://dynomotion.com/Software/CPrograms/SoftLimitsWithMode.c
>  
>  
> #3 Change your Home user program to set the mode to 1 at the beginning of the Home and mode to 2 at the end
>  
> #define #define LMODEV 99
> persist.UserData[LMODEV]=1;
> .
> .
> .
> persist.UserData[LMODEV]=2;
>  
>  
> Please give it a try and see if it works.
>  
> Regards
> TK
>
>  
> From: frank_19_88 <frank_19_88@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 18, 2011 9:52 AM
> Subject: [DynoMotion] Re: soft limit switch
>
>
>  
> Hi Tom,
>
> At the moment i can home the Maho machine for this i used HomeEncoderMach3.C so X, Y and Z can be homed by pressing 'Ref all home'.
>
> I want to create soft limits, in this forum i read it is not possible to use mach3 soft limits. But i could not found an solution at this form. (Only read it is possible to create an .c file with your help)
>
> Can you help me creating an .c file for the following subjects:
> - Soft limit (Like X can move from the home position to -10.000 till +300.000)
> - Mach3 movement shoot be disabled when the machine isn't homed or when the soft limits are not active.
>
> If you have an sample I can modify it and try it out tomorrow.
>
> Thank you,
>
> Frank
>
> --- In DynoMotion@yahoogroups.com, "frank_19_88" <frank_19_88@> wrote:
> >
> > Hey Tom,
> >
> > Proud to present you the following video of my maho 300C
> > http://youtu.be/BGoXeestgy4
> >
> > Frank,
> >
>